package common

import (
	"database/sql"
	_ "github.com/go-sql-driver/mysql"
)

func MysqlConnet() {

	dsn := "user:password@tcp(localhost:3306)/dbname?charset=utf8mb4&parseTime=true"
	db, err := sql.Open("mysql", dsn)
	if err != nil {
		panic(err) // 或者其他错误处理方式
	}
	defer db.Close()

}
